<template>
    <div>
        <h2>用户登录</h2>
        <p>用户名：<input type="text" v-model="username"></p>
        <p>密码：<input type="password" v-model="password"></p>
        <button @click="loginv()">登录</button>    
    </div>    
</template>

<script>
import {loginv} from "../axios_api/api.js"
export default {
    name:"loginv",
    data() {
        return {
            username:"",
            password:""
        }
    },
    methods:{
        loginv(){
            var data = {
                "username":this.username,
                "password":this.password
            }
            loginv(data).then(res=>{
                console.log(res)
            })
        }
    }
}
</script>

<style>

</style>

